home *** CD-ROM | disk | FTP | other *** search
/ QRZ! Ham Radio 8 / QRZ Ham Radio Callsign Database - Volume 8.iso / pc / files / dsp / 56200tar.z / 56200tar / 56200 / p1 next >
Text File  |  1992-04-28  |  6KB  |  168 lines

  1.  
  2.  
  3.  
  4.                 *********************************
  5.                 **  DSP56200 SUPPORT SOFTWARE  **
  6.                 *********************************
  7.  
  8.  
  9.      GENERAL DESCRIPTION:
  10.  
  11.  
  12.           The DSP56200 is a DSP peripheral, designed for FIR
  13.      and  LMS Adaptive filtering.  The DSP56200 is described
  14.      in Motorola  Technical  Summary,  BR283,  and  Motorola
  15.      Advance Information, DSP56200/D.
  16.  
  17.           Since the DSP56200 is a  peripheral,  it  must  be
  18.      interfaced  to  a  host  processor.  The host processor
  19.      must run a device driver program which initializes  the
  20.      DSP56200  and  provides  real  time input/output to the
  21.      DSP56200.  Each example reflects the usage of the  chip 
  22.      in a  certain  mode and  environment. The  programs are 
  23.      provided as tools  and  will need to be modified by the
  24.      design engineer to fit into an actual application.
  25.  
  26.           The device drivers are written in the  programming
  27.      language  "C",  and  all have been tested and verified.
  28.      Although written in "C", the  programs  are  well  com-
  29.      mented  and  written in a style which should make sense
  30.      to users familiar  with  other  high  level  languages.
  31.      Comments  are included which point out helpful program-
  32.      ming tricks, and each program is flowcharted. For users
  33.      uncomfortable with "C", a helpful appendix is  included
  34.      at the end of this document.
  35.  
  36.  
  37.      PROGRAMMING THE HOST PROCESSOR:
  38.  
  39.  
  40.           The four device driver examples  described  herein
  41.      can  be classified according to the DSP56200's mode and
  42.      environment as follows:
  43.  
  44.         (p2) Interrupt Driven Adaptive Filter   -Flowchart
  45.         (p3) Interrupt Driven Adaptive Filter   -"C" Code
  46.         (p4) Polled I/O Adaptive Filter         -Flowchart
  47.         (p5) Polled I/O Adaptive Filter         -"C" Code
  48.         (p6) Interrupt Driven Dual FIR Filter   -Flowchart
  49.         (p7) Interrupt Driven Dual FIR Filter   -"C" Code
  50.         (p8) Polled I/O Dual FIR Filter         -Flowchart
  51.         (p9) Polled I/O Dual FIR Filter         -"C" Code
  52.  
  53.      In the interrupt driven environment, the host processor
  54.      is  interrupted every time the DSP56200 receives a ris-
  55.      ing edge on its START pin.  In the polled I/O  environ-
  56.      ment,  the  host  processor  polls  a  pin  tied to the
  57.      DSP56200's START pin.  The programs are complete except
  58.      for  the  lowest  level routines, which perform the I/O
  59.      for  the  host  processor  and  are  system  dependent.
  60.      Typically,  a user would select the correct program for
  61.      an application  and  translate  it  into  the  assembly
  62.      language  of the host processor, filling in the details
  63.      such as the I/O routines  and  other  system  dependent
  64.      code.
  65.  
  66.  
  67.  
  68. ===========================================================================
  69.  
  70.  
  71.  
  72.      APPENDIX 1 - READING PROGRAMS WRITTEN IN "C":
  73.  
  74.  
  75.  
  76.         1. Commenting in "C":
  77.  
  78.            Comments are defined as any text between "/*" and "*/".
  79.            Below are some examples of comments:
  80.  
  81.                  /************************\
  82.                  |* Example of a comment *|
  83.                  \************************/
  84.  
  85.                  /* Example of a comment */
  86.  
  87.                  /* Example of
  88.                     a comment */
  89.  
  90.  
  91.  
  92.         2. Constants in "C":
  93.  
  94.            Constants are always defined at the top of the file, and are
  95.            defined as follows:
  96.  
  97.               #define NAME_OF_CONSTANT value_of_constant
  98.  
  99.            Typically, constants have all capital letters, and hex constants
  100.            are preceded with the characters "0x".  Below are 2 examples:
  101.  
  102.                  #define DEC_CONST 14      /* Example of a decimal constant */
  103.                  #define HEX_CONST 0xe     /* Example of a hex constant */
  104.  
  105.  
  106.  
  107.         3. Looping in "C":
  108.  
  109.            The "for" loop in "C" is equivalent to the following flow chart:
  110.  
  111.                  for (tap=1; tap<=maxval; tap=tap+1)   {
  112.                     /* statements in loop */
  113.                  }
  114.  
  115.            Equivalent Flow Chart:
  116.  
  117.                                   |              
  118.                                   |              
  119.                             ------------
  120.                             |  tap = 1  |
  121.                             ------------
  122.                                   |              
  123.                     ------------->+
  124.                    |              |              
  125.                    |        -------------   
  126.                    |      / tap <= maxval \______________
  127.                    |      \       ?       / No           |
  128.                    |        -------------                |
  129.                    |              | Yes                  |
  130.                    |              |                      |
  131.                    |     ----------------------          |
  132.                    |     | Statements in Loop |          |
  133.                    |     ----------------------          |
  134.                    |              |                      |
  135.                    |              |                      |
  136.                    |       ---------------               |
  137.                    |       | tap = tap+1 |               |
  138.                    |       ---------------               |
  139.                    |              |                      |
  140.                    |              |                      |
  141.                     --------------                       |
  142.                                                          |
  143.                                                          |
  144.                                    ----------------------
  145.                                   |
  146.                                   V
  147.  
  148.  
  149.  
  150.         4. Logical Operations in "C":
  151.  
  152.            "C" has operators which perform logical operations:
  153.  
  154.               SYMBOL   LOGICAL OPERATION
  155.               ------   -----------------
  156.                 &         AND
  157.                 >>        Right Shift
  158.                 <<        Left Shift
  159.  
  160.            Examples:
  161.            --------
  162.               "0xabcd & 0x00ff" results in 0x00cd.  Grabs lower byte.
  163.               "0x1234 >> 8" results in 0x0012.  Shifts off lower byte.
  164.               "0xefab << 8" results in 0xab00.  Moves lower byte to upper byte.
  165.               "(0xefab << 8) + 0x00cd" results in 0xabcd.  This is one method
  166.                  for combining two bytes into one 16-bit integer.
  167.  
  168.